<div class="campaigns" ui-view="container">
    <ol class="breadcrumb" style="font-size: 12px">
        <li>广告中心</li>
        <li>广告主</li>
        <li>广告主帐号管理</li>
    </ol>
    <div class="panel">
        <div class="searchWapper">
            <div class="form-group searchLump search-condition">
                <div class="searchTitle">筛选：</div>
                <div class="btn btn-xs condition" ng-repeat="(key,value) in search" ng-if="advertiserType[value]||status[value]&&(key=='advertiserType'||key=='status')">
                    <a href="javascript:void(0);" class="close" ng-click="deletes(key)">
                        <span aria-hidden="true">&times;</span>
                    </a>
                    {{advertiserType[value]}}
                    {{status[value]}}
                </div>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">类型：</div>
                <label class="btn btn-xs" ng-class="{on : search.advertiserType == key}"  ng-repeat="(key, value) in advertiserType">
                    <input type="radio" class="hide" name="radioPay" ng-value="key" ng-model="search.advertiserType" ng-change="searchChange()">{{value}}
                </label>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">状态：</div>
                <label class="btn btn-xs" ng-class="{on : search.status == key}" ng-repeat="(key, value) in status">
                    <input type="radio" class="hide"  name="radioStatus"  ng-value="key" ng-model="search.status" ng-change="searchChange()">{{value}}
                </label>
            </div>
        </div>
        <div class="bg-20"></div>
        <div class="panel-heading panel-style">
            <div class="row panel-row">
                <div class="col-lg-3">
                    <div class="input-group input-group-sm">
                        <input type="text" class="form-control" name="keyword" ng-model="keyword" placeholder="搜索">
						<span class="input-group-btn btn-bearch">
							<button class="btn btn-default" type="button" ng-click="searchClick(keyword)">
                                <i class="glyphicon glyphicon-search"></i>
                            </button>
						</span>
                    </div>
                </div>
                <div class="search-operation pull-right">
                    <a ui-sref="advertisers.detail" class="btn">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                    </a>
                    <a href="javascript:void(0);" class="btn" ng-click="deleteAdvertisers()">
                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                    </a>
                </div>
            </div>
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>选择</th>
                    <th>序号</th>
                    <th>账号</th>
                    <th>广告主</th>
                    <th>广告类型</th>
                    <th>广告计划</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr  ng-repeat="advertiser in advertisersList.pageList">
                    <td>
                        <input type="checkbox" ng-model="advertiser.checked" class="magic-checkbox" id="{{'advertisersList' + ($index + 1)}}">
                        <label for="{{'advertisersList' + ($index + 1)}}"></label>
                    </td>
                    <td>{{$index+1}}</td>
                    <td>{{advertiser.userName}}</td>
                    <td><a  ui-sref="advertisers.detail({advertiserId:advertiser.advertiserId})"><p class="list-rlue" ng-bind-html="$sce.trustAsHtml(advertiser.shortName)"></p></a></td>
                    <td>{{table[advertiser.advertiserType]}}</td>
                    <td><p class="list-rlue">{{advertiser.campaignNum}}</p></td>
                    <td>{{table[advertiser.status]}}</td>
                    <td>
                       <!-- <a href="javascript:void(0);"   ng-click="changeDisabled(advertiser)" class="time-out">
                            {{advertiser.disabled == 1 ? "激活" : "冻结"}}
                        </a>-->
                        <a  ng-click="changeDisabled(advertiser.advertiserId, advertiser.status)" class="time-out">
                            {{advertiser.status == 1 ? "激活" : "冻结"}}

                        </a>

                        <a  ng-click="resetAdvPassword(advertiser.advertiserId,advertiser.userName)">重置</a></td>
                </tr>
                </tbody>
            </table>
        </div>

    </div>
    <div class="panel-footer">
        <s-pagination conf="paginationConf"></s-pagination>
    </div>
    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->

</div>
